
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-dotWithFrame"></use>
                    </svg>
                    <div class="name">点-带框</div>
                    <div class="fontclass">#icon-dotWithFrame</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-dot"></use>
                    </svg>
                    <div class="name">点</div>
                    <div class="fontclass">#icon-dot</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-help"></use>
                    </svg>
                    <div class="name">帮助</div>
                    <div class="fontclass">#icon-help</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-edit"></use>
                    </svg>
                    <div class="name">编辑</div>
                    <div class="fontclass">#icon-edit</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-pieChart"></use>
                    </svg>
                    <div class="name">饼图</div>
                    <div class="fontclass">#icon-pieChart</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-dot-line"></use>
                    </svg>
                    <div class="name">点-横</div>
                    <div class="fontclass">#icon-dot-line</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-email"></use>
                    </svg>
                    <div class="name">电子邮件e</div>
                    <div class="fontclass">#icon-email</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-card"></use>
                    </svg>
                    <div class="name">个人卡片</div>
                    <div class="fontclass">#icon-card</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-close"></use>
                    </svg>
                    <div class="name">关闭</div>
                    <div class="fontclass">#icon-close</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-correct"></use>
                    </svg>
                    <div class="name">勾</div>
                    <div class="fontclass">#icon-correct</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-close2"></use>
                    </svg>
                    <div class="name">关闭02</div>
                    <div class="fontclass">#icon-close2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-correct2"></use>
                    </svg>
                    <div class="name">勾2</div>
                    <div class="fontclass">#icon-correct2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-add"></use>
                    </svg>
                    <div class="name">加</div>
                    <div class="fontclass">#icon-add</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-add2"></use>
                    </svg>
                    <div class="name">加2</div>
                    <div class="fontclass">#icon-add2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-reduce"></use>
                    </svg>
                    <div class="name">减</div>
                    <div class="fontclass">#icon-reduce</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-reduce2"></use>
                    </svg>
                    <div class="name">减2</div>
                    <div class="fontclass">#icon-reduce2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow2_right"></use>
                    </svg>
                    <div class="name">箭头2-right</div>
                    <div class="fontclass">#icon-arrow2_right</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow2_up"></use>
                    </svg>
                    <div class="name">箭头2-up</div>
                    <div class="fontclass">#icon-arrow2_up</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow2_first"></use>
                    </svg>
                    <div class="name">箭头2-首页</div>
                    <div class="fontclass">#icon-arrow2_first</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow2_last"></use>
                    </svg>
                    <div class="name">箭头2-尾页</div>
                    <div class="fontclass">#icon-arrow2_last</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow2_down"></use>
                    </svg>
                    <div class="name">箭头2-down</div>
                    <div class="fontclass">#icon-arrow2_down</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow2_left"></use>
                    </svg>
                    <div class="name">箭头2-left</div>
                    <div class="fontclass">#icon-arrow2_left</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow_down"></use>
                    </svg>
                    <div class="name">箭头-down</div>
                    <div class="fontclass">#icon-arrow_down</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow_left"></use>
                    </svg>
                    <div class="name">箭头-left</div>
                    <div class="fontclass">#icon-arrow_left</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow_right"></use>
                    </svg>
                    <div class="name">箭头-right</div>
                    <div class="fontclass">#icon-arrow_right</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow_up"></use>
                    </svg>
                    <div class="name">箭头-up</div>
                    <div class="fontclass">#icon-arrow_up</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow_first"></use>
                    </svg>
                    <div class="name">箭头-首页</div>
                    <div class="fontclass">#icon-arrow_first</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow_last"></use>
                    </svg>
                    <div class="name">箭头-尾页</div>
                    <div class="fontclass">#icon-arrow_last</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-money"></use>
                    </svg>
                    <div class="name">金币</div>
                    <div class="fontclass">#icon-money</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-funnel"></use>
                    </svg>
                    <div class="name">漏斗</div>
                    <div class="fontclass">#icon-funnel</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-alarm"></use>
                    </svg>
                    <div class="name">闹铃</div>
                    <div class="fontclass">#icon-alarm</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-catalog"></use>
                    </svg>
                    <div class="name">目录</div>
                    <div class="fontclass">#icon-catalog</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-alarm2"></use>
                    </svg>
                    <div class="name">闹铃-线性</div>
                    <div class="fontclass">#icon-alarm2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-circle"></use>
                    </svg>
                    <div class="name">圈</div>
                    <div class="fontclass">#icon-circle</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-person"></use>
                    </svg>
                    <div class="name">人员</div>
                    <div class="fontclass">#icon-person</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-date"></use>
                    </svg>
                    <div class="name">日期</div>
                    <div class="fontclass">#icon-date</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-date2"></use>
                    </svg>
                    <div class="name">日期02</div>
                    <div class="fontclass">#icon-date2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-delete"></use>
                    </svg>
                    <div class="name">删除</div>
                    <div class="fontclass">#icon-delete</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-favorites"></use>
                    </svg>
                    <div class="name">收藏</div>
                    <div class="fontclass">#icon-favorites</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-setting"></use>
                    </svg>
                    <div class="name">设置</div>
                    <div class="fontclass">#icon-setting</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-dbArrow_down"></use>
                    </svg>
                    <div class="name">双箭头-down</div>
                    <div class="fontclass">#icon-dbArrow_down</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-search"></use>
                    </svg>
                    <div class="name">搜索</div>
                    <div class="fontclass">#icon-search</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-dbArrow_up"></use>
                    </svg>
                    <div class="name">双箭头-top</div>
                    <div class="fontclass">#icon-dbArrow_up</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-lock"></use>
                    </svg>
                    <div class="name">锁</div>
                    <div class="fontclass">#icon-lock</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-warn"></use>
                    </svg>
                    <div class="name">提醒</div>
                    <div class="fontclass">#icon-warn</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-addTo"></use>
                    </svg>
                    <div class="name">添加</div>
                    <div class="fontclass">#icon-addTo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-addDoc"></use>
                    </svg>
                    <div class="name">添加文档</div>
                    <div class="fontclass">#icon-addDoc</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-notice"></use>
                    </svg>
                    <div class="name">通告</div>
                    <div class="fontclass">#icon-notice</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-text"></use>
                    </svg>
                    <div class="name">文本</div>
                    <div class="fontclass">#icon-text</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-headPortrait"></use>
                    </svg>
                    <div class="name">头像</div>
                    <div class="fontclass">#icon-headPortrait</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-text3"></use>
                    </svg>
                    <div class="name">文本3</div>
                    <div class="fontclass">#icon-text3</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-text2"></use>
                    </svg>
                    <div class="name">文本2</div>
                    <div class="fontclass">#icon-text2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-message"></use>
                    </svg>
                    <div class="name">消息</div>
                    <div class="fontclass">#icon-message</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-folder"></use>
                    </svg>
                    <div class="name">文件夹</div>
                    <div class="fontclass">#icon-folder</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-package"></use>
                    </svg>
                    <div class="name">文件包</div>
                    <div class="fontclass">#icon-package</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-show"></use>
                    </svg>
                    <div class="name">显示</div>
                    <div class="fontclass">#icon-show</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-letter"></use>
                    </svg>
                    <div class="name">信封</div>
                    <div class="fontclass">#icon-letter</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-selectText"></use>
                    </svg>
                    <div class="name">选择文本</div>
                    <div class="fontclass">#icon-selectText</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-maximization"></use>
                    </svg>
                    <div class="name">最大化</div>
                    <div class="fontclass">#icon-maximization</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-hide"></use>
                    </svg>
                    <div class="name">隐藏</div>
                    <div class="fontclass">#icon-hide</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-minimize"></use>
                    </svg>
                    <div class="name">最小化</div>
                    <div class="fontclass">#icon-minimize</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow3_left"></use>
                    </svg>
                    <div class="name">箭头3-left </div>
                    <div class="fontclass">#icon-arrow3_left</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow3_right"></use>
                    </svg>
                    <div class="name">箭头3-right </div>
                    <div class="fontclass">#icon-arrow3_right</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-collected"></use>
                    </svg>
                    <div class="name">已收藏</div>
                    <div class="fontclass">#icon-collected</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-excel"></use>
                    </svg>
                    <div class="name">excel</div>
                    <div class="fontclass">#icon-excel</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-export"></use>
                    </svg>
                    <div class="name">导出</div>
                    <div class="fontclass">#icon-export</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-gridmin"></use>
                    </svg>
                    <div class="name">表格最小化</div>
                    <div class="fontclass">#icon-gridmin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-gridmax"></use>
                    </svg>
                    <div class="name">表格最大化</div>
                    <div class="fontclass">#icon-gridmax</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-refresh"></use>
                    </svg>
                    <div class="name">刷新</div>
                    <div class="fontclass">#icon-refresh</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
